<template>
	<view class="">
		<view class="dowlond flex-between" v-if="type==1">
			<view class="flex-between">
				<image class="logoICO" src="../../../static/images/logo1.png" mode=""></image>
				<view class="logoText">
					<text>DataGold</text>
				</view>
			</view>
			<button @click="goDowlond()">去下载</button>
		</view>
		<view class="flex-column ai-center" v-if="type==2">
			<!-- <text class="fs24 text-grey">----or-----</text> -->
			<view class="fs26  mtb-20" @click="goDowlond()">
				<text class="fs30 pr-16">没有GRBQ农场游戏APP</text>
				<text class="fs30 text-primary">去下载</text>
			</view>
		</view>
	</view>
</template>

<script>
	import { invUrl } from '@/common/baseconfig.js'
	import { mapState } from 'vuex'
	export default {
		name: 'downLink',
		data() {
			return {

			}
		},
		props: {
			type: {
				type: Number,
				default: () => {
					return 1
				}
			},
			item: {
				type: Object,
				default () {
					return {}
				}
			},
		},
		computed: {
			...mapState({
				webUrl: state => state.general.webUrl
			}),
			downUrl() {
				return invUrl+'pages/login/download/download'
			},
		},
		mounted() {},
		methods: {
			goDowlond() {
				window.open(this.downUrl) 
			}
		}
	}
</script>

<style lang="scss" scoped>
	.dowlond {
		padding: 12rpx 24rpx;
		background-color: #8f7600;
		border-radius: 12rpx;

		&>view {
			color: #fff;

			.logoICO {
				width: 64rpx;
				height: 64rpx;
			}

			.logoText {
				padding-left: 24rpx;
				font-size: 27rpx;
			}
		}

		&>button {
			font-size: 21rpx;
			border: 2rpx solid #fff;
			color: #fff;
			border-radius: 30rpx;
			padding: 0rpx 20rpx !important;
			height: 50rpx;
			line-height: 50rpx;
		}
	}
</style>
